// Payment 抽象类
public abstract class Payment {
    protected float amount;

    public Payment(float amount) {
        this.amount = amount;
    }

    public float getAmount() {
        return amount;
    }
}

// Credit类
public class Credit extends Payment {
    private String number;
    private String type;
    private Date expireDate;

    public Credit(float amount, String number, String type, Date expireDate) {
        super(amount);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }
}

// Cash类
public class Cash extends Payment {
    private float cashTendered;

    public Cash(float amount, float cashTendered) {
        super(amount);
        this.cashTendered = cashTendered;
    }
}

// WireTransfer类
public class WireTransfer extends Payment {
    private String bankID;
    private String bankName;

    public WireTransfer(float amount, String bankID, String bankName) {
        super(amount);
        this.bankID = bankID;
        this.bankName = bankName;
    }
}

// AliPay类
public class AliPay extends Payment {
    private String number;

    public AliPay(float amount, String number) {
        super(amount);
        this.number = number;
    }
}

// WeixinPay类
public class WeixinPay extends Payment {
    private String number;

    public WeixinPay(float amount, String number) {
        super(amount);
        this.number = number;
    }
}
